

#ifdef VERTEX
vec4 GetFullScreenTriangleVertexPosition(uint vertexID)
{
    // note: the triangle vertex position coordinates are x2 so the returned UV coordinates are in range -1, 1 on the screen.
    vec2 uv = vec2((vertexID << 1) & 2u, vertexID & 2u);
    vec4 pos = vec4(uv * 2.0 - 1.0, 1, 1.0);
//    #ifdef UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION
//    pos = ApplyPretransformRotation(pos);
//    #endif
    return pos;
}
out vec2 screenUV;
void main(){
    vec4 pos = GetFullScreenTriangleVertexPosition(gl_VertexID);
    gl_Position = pos;
    screenUV = 0.5 * (pos.xy + 1);
}
#endif

#ifdef FRAGMENT
in vec2 screenUV;
void mainImage( out vec4 fragColor, in vec2 fragCoord );
void main(){
    vec4 col;
    vec2 fragCoord = screenUV * _ScreenSize;
    mainImage(col, fragCoord);
    //Gamma Correct
    col = col*col;
    gl_FragColor = col;
}
#endif